<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: SXLWTT
  Date: 2021/10/15
  Time: 9:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="/js/jquery-1.9.1.min.js"></script>
    <script src="/js/fileupload.js"></script>
    <link rel="stylesheet" href="/css/img.css">
</head>
<body>

<marquee>
    欢迎${user.uname}登录本系统

</marquee><a href="reg.do">注销</a>
<table>
    <tr>
        <td colspan="11">
            <form action="list.do" method="post">
                <input type="hidden" name="pageNum">
                房主姓名：<input type="text" name="oname" value="${map.oname}">
                房产坐落地址：<input type="text" name="address" value="${map.address}">
                <input type="submit" value="查找">
            </form>
        </td>
    </tr>
    <tr>
        <td>房产编号</td>
        <td>房产姓名</td>
        <td>坐落地址</td>
        <td>用途</td>
        <td>面积</td>
        <td>图片</td>
        <td>操作</td>
    </tr>
    <c:forEach items="${pageInfo.list}" var="li">
        <tr>
            <td>${li.hid}</td>
            <td>${li.onames}</td>
            <td>${li.address}</td>
            <td>${li.huse}</td>
            <td>${li.harea}</td>
            <td>${li.pic}</td>
            <td>--</td>
        </tr>
    </c:forEach>
    <tr>
        <td colspan="11">
            <a href="javaScript:asd(1)">首页</a>
            <a href="javaScript:asd(${pageInfo.isFirstPage?1:pageInfo.prePage})">上页</a>
            <c:forEach items="${pageInfo.navigatepageNums}" var="index">
                <a href="javaScript:asd(${index})">${index}</a>
            </c:forEach>
            <a href="javaScript:asd(${pageInfo.isLastPage?pageInfo.pages:pageInfo.nextPage})">下页</a>
            <a href="javaScript:asd(${pageInfo.pages})">尾页</a>
            第${pageInfo.pageNum}页/共${pageInfo.pages}页
        </td>
    </tr>
</table>
</body>
</html>
<script>
function asd(pageNum) {
    $("[name='pageNum']").val(pageNum)
    $("form").submit();
}
</script>
